package cn.org.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.org.IDao.PositionMapper;
import cn.org.domain.Person;
import cn.org.domain.Position;
import cn.org.service.IPositionService;

@Service("positionService")
public class PositionServiceImpl implements IPositionService {
	@Resource
	private PositionMapper positionDao;

	@Override
	public int deleteByPrimaryKey(Integer id) {
		
		return positionDao.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(Position record) {
		return positionDao.insert(record);
	}

	@Override
	public int insertSelective(Position record) {
		return positionDao.insertSelective(record);
	}

	@Override
	public Position selectByPrimaryKey(Integer id) {
		return positionDao.selectByPrimaryKey(id);
	}

	@Override
	public int updateByPrimaryKeySelective(Position record) {
		return positionDao.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(Position record) {
		return positionDao.updateByPrimaryKey(record);
	}

	@Override
	public List<Position> getPositionByPerson(Person p) {
		return positionDao.getPositionByPerson(p.getId());
	}

	@Override
	public List<Position> getAllPosition() {
		// TODO Auto-generated method stub
		return positionDao.getAllPosition();
	}

	



	

	
	

}
